package 多线程.休眠;

public class Example implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            if (i==2){
                try {
                    System.out.println("副线程暂停两秒");
                    Thread.sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            System.out.println("Ex..线程："+i);
        }
    }
}
